home *** CD-ROM | disk | FTP | other *** search
- On 27-Mar-98, Lee wrote:
-
- >inparticular) I thought I would write Amos Robots.
- >Is there any interest?
-
- Long time ago I actually made something likewise in AMOS.
- The program is very badly documented and it's long time since I made it, so
- I'll probably use some time on remembering what it is all about...
-
- But there is some sort of board with some robots on.
- The robots can read data about all the robots and about the board (The board
- is a 2D array, where 0 means open floor, -1 means wall, and >0 means robot
- number N (the robot itself has number one))
-
- The arrays:
- BOARD(,): the board (commented above)
- RX(): Robot x-coord
- RY(): Robot y-coord
- RDIR(): Robot direction (0:right, 1:down, 2:left, 3:up)
- RENE(): Robot Energy (0:dead, 10:as healthy as can be)
- NAME$(): The name of the robot (can't be changed after start)
-
- Global variables:
- KOM$: The robots can use this variable to "talk" (that is: write comments on
- the screen. If they put anything in this string, then the string will be
- printed after the robot hasa returned)
- NUM: Number of robots
- WX: Width of board
- WY: Heigth of board
- SR: Status register. This is the only changeable variable that will be
- reserved from call to call. Use it for whatever you want.
-
- The robot programs are included into procedures, so it is illegal to make
- procedures in you programs (as it is illegal to have procedures nested into
- each other)
-
- The procedure returns:
-
- -2: Shoot (if there is a robot in front, then the robot will loose one
- energy-point)
- -1: Walk (Walks one step forwards. If there is a wall then nothing. If there
- is a robot in front then the robot is pushed (moved along))
- 0: Nop
- >0: Add N to RDIR (that is: 1:turn right ; 2:U-turn ; 3:turn left)
-
- First time the procedure is called then RX(1)=-1. Then the robot shall not do
- its move. Instead it shall return it's name...
-
- A robot program can look something like this:
-
- If RX(1)=-1 : Pop Proc["C0000L ROBOT"] : End If
- X=RX(1) : Y=RY(1) : DIR=RDIR(1) : ENERGY=RENEa(1)
- ( find out what to return here )
- Pop Proc[RETURN_VALUE]
-
- The gfx havent been made yet, so we are talking block gfx, and the game needs
- overall finish.
- Included a little screen shot :) (all robots are controlled by the same
- program: "Lemmus Opus #1")
- But it sure is playable :)
- If you are interrested then I'll spend some time on commenting it and posting
- it here...
- I think that I've mentioned all the rules above. But if there's nothing that's
- not clear, then let me know!
-
- --
-
- /¯\ __ __ /¯¯¯¯¯\ _ Rune Zedeler
- ________/ /// \\__/ \\\ ---/ \¯-_ Peter Rørdams Vej 19
- \ / //¯| \\/ ||¯\ \\¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯-_ 2800 Lyngby
- ) / // | \ ` / || \ \\ Lemmus of Efreet - Denmark
- / / ¯¯¯¯¯\\|\-'/ /¯¯¯¯¯ \\____________ _-¯
- ¯¯¯¯¯\------'/||¯¯| \------'/ /_-¯ rzedeler@post10.tele.dk
- ¯¯¯¯¯¯\-'/ \-'/¯¯¯¯¯¯ ¯ Tel: +45-45871730
- ¯¯ ¯¯
-
-